package com.foreknow.Test;

import javax.xml.crypto.Data;
import java.text.SimpleDateFormat;
import java.util.Date;

public class TestDate {
    public static void main(String[] args) {
        //日期
        Date date = new Date();
        System.out.println(date);

        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyy-MM-dd");
        String new_date = simpleDateFormat.format(date);
        System.out.println(new_date);
    }
}
